﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GeneralClasses;

namespace Algorithm
{
    public abstract class Constraint
    {
        protected int[] schedule;
        protected ScheduleData scheduleData;
        protected float points;

        /// <summary>
        /// Precondition: Points < 0.
        /// Postcondition: Creates a constraint object and initializes the schedule and points variables.
        /// </summary>
        public Constraint(int[] schedule, ScheduleData scheduleData, float points)
        {
            this.schedule = schedule;
            this.scheduleData = scheduleData;
            this.points = points;
        }

        /// <summary>
        /// Preconditions: None.
        /// Postconditions: Returns a 0 if the Schedule doesn't violate this constraint, else returns a negative points value.
        /// </summary>
        public abstract float Evaluate();
    }
}
